/*
 ============================================================================
 @file       : Game.cpp
 @author     : Jonathan MERCIER
 @date       : 31 janv. 2010
 @version    : 0.1
 
 @section LICENSE
 Copyright   : GPL v3+
 (c)Jonathan MERCIER (read doc for more information)
 Copyright (C) Author: Jonathan MERCIER 2010

 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.

  
 @section DESCRIPTION
 Description :  
 ============================================================================
 */

#include "Application.h"

Application::Application(engine::Engine *network, engine::Engine *game, engine::Engine *graphics, engine::Engine *sound)
{
	modulesList.resize(4,NULL);
	modulesList[0]	= network;
	modulesList[1]	= game;
	modulesList[2]	= graphics;
	modulesList[3]	= sound;
}

Application::Application(engine::Engine *network, engine::Engine *game)
{
	modulesList.resize(2,NULL);
	modulesList[0]	= network;
	modulesList[1]	= game;

}

Application::~Application()
{

}

void Application::run()
{

	#pragma omp parallel
	{
		#pragma omp parallel for
		for (unsigned short i = 0; i < modulesList.size(); i++)
		{
			modulesList[i]->frame();
		}
	}

}


